﻿using System;
using System.Collections.Generic;

namespace YummyGame.Framework
{
    
    public abstract class SkillActionPrototype:IPoolObject
    {
        public string name;

        public virtual void OnEnable() { }

        public virtual void OnDisable() { }

        public SkillActionPrototype() { }

        public SkillAction ToRuntime(SkillExecuter executer)
        {
            var action = GetRuntimeInternal();
            action.Executer = executer;
            action.Prototype = this;
            action.Reactive();
            return action;
        }

        protected abstract SkillAction GetRuntimeInternal();
    }
}
